Skip to content

fix(id/world): reject malformed chat.history count types (#7892) - #8016

Merged
dezren39 merged 2 commits into
mainfrom
sweep/7892-chat-history-count
Nov 14, 2026
Merged

dezren39 merged 2 commits into
mainfrom
sweep/7892-chat-history-count

Conversation

@dezren39

@dezren39 dezren39 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Opened by the git hygiene sweep from previously-unpushed work: this finished commit (b03e681, 2026-11-08 20:29 CST) was sitting unpushed in the idle fleet tree ~/git/fleet/sweep-7892 with no PR. The sweep pushed the branch and opened this PR per issue #1371 Duty A.

Refs #7892


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 9, 2026 09:20
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T09:20:06.774475Z
We couldn’t complete this review. Comment @codex review to try again.
b03e681 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a680fe89-b262-498f-9dce-0d7b90999b6e
Commits

Reviewing files that changed from the base of the PR and between 44a8d7c and 4f6da16.

Files selected for processing: 2

  • pkgs/id/crates/id-worlds/src/world/actor.rs
  • pkgs/id/crates/id-worlds/src/world/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

Sweep update for #7892: the actor now rejects malformed supplied chat.history counts instead of silently substituting the default, and clamps unsigned values before converting to usize to avoid 32-bit truncation. Regression coverage checks malformed values and the 2^32 boundary. Focused test passed (1 test, exit 0); git diff --check passed. Pushed head 96bfc1a; awaiting PR checks before merge.

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 14, 2026
repo-worker-code-k added 2 commits November 14, 2026 15:15
A supplied count that is not an unsigned integer was silently treated as omitted and served the default 16 lines. Only an omitted count now falls back to 16; any other JSON kind returns bad_args. Adds string, negative, fractional, null, and object cases to the existing default/clamp world-level regression test.
@dezren39
dezren39 force-pushed the sweep/7892-chat-history-count branch from 96bfc1a to 4f6da16 Compare November 14, 2026 21:24
@dezren39
dezren39 merged commit bcaa352 into main Nov 14, 2026
2 checks passed
@dezren39
dezren39 deleted the sweep/7892-chat-history-count branch November 14, 2026 21:25
@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 14, 2026
@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
state: done
task: 17251
lane: code-b
worker: repo-worker-code
note: PR #8016 merged in task 17251 (merge commit bcaa352). Both branch commits were ported across the crate split: pkgs/id/src/world/{actor,tests}.rs moved to pkgs/id/crates/id-worlds/src/world/ on main, so the rebase modify/delete conflicts were resolved by applying the changes at the new location (reject malformed chat.history count types; clamp the count in u64 before conversion). Fresh verification: cargo test -p id-worlds --lib chat — 32 passed, including chat_history_defaults_and_clamps_and_records_read_rejects_an_oversized_first_record with the new malformed-count and u32-overflow cases; rustfmt applied to the changed hunk. No review findings existed on the PR. Issue #7892 remains open (this PR referenced it, it did not close it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant